package spring.jpa.service.impl;

import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import spring.jpa.entity.Customer;
import spring.jpa.repository.CustomerRepository;
import spring.jpa.repository.springdata.CustomerRepositorySpringData;
import spring.jpa.service.CustomerService;

@Service
@RequiredArgsConstructor
public class CustomerServiceImpl implements CustomerService {
    final CustomerRepository customerRepository;
    final CustomerRepositorySpringData customerRepositorySpringData;

    @Override
    public void save(Customer customer) {
        // customerRepository.save(customer);
        customerRepositorySpringData.save(customer);
    }
}